﻿<Window x:Class="monitor_server_2_WPF.SplashWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:gif="http://wpfanimatedgif.codeplex.com"
        Title="SplashWindow" Height="280" Width="640" Topmost="True" WindowStartupLocation="CenterScreen" 
        WindowStyle="None" ShowInTaskbar="False" ResizeMode="NoResize" Background="Transparent" Closed="Window_Closed">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="180"/>
            <RowDefinition Height="100"/>
        </Grid.RowDefinitions>
        <Image Name="AnimationImage" gif:ImageBehavior.AnimatedSource="pack://application:,,,/Resources/cool_loading.gif" Grid.Row="0" Margin="0,0,0,0" ></Image>
        <!--<DockPanel Name="MGrid" Background="Transparent" HorizontalAlignment="Left" Width="640" Height="180" VerticalAlignment="Top" Grid.Row="0"/>-->
        <Border Background="Orange" BorderBrush="Transparent" BorderThickness="0" Margin="0,0,0,0" Grid.Row="1">
            <Label Name="ContentLabel" Content="Loading..." FontSize="48" HorizontalAlignment="Center" Margin="0,0,0,0" VerticalAlignment="Center" Foreground="MintCream" Width="210">
                <Label.Style>
                    <Style TargetType="{x:Type Label}">
                        <Style.Resources>
                            <Storyboard x:Key="FlashAnimation" >
                                <DoubleAnimation Storyboard.TargetProperty="Opacity" From="1" To="0" AutoReverse="True" Duration="0:0:1" RepeatBehavior="Forever" />
                            </Storyboard>
                        </Style.Resources>

                        <Style.Triggers>
                            <Trigger Property="Visibility"  Value="Visible">
                                <Trigger.EnterActions>
                                    <BeginStoryboard x:Name="flash" Storyboard="{StaticResource FlashAnimation}" />
                                </Trigger.EnterActions>
                                <Trigger.ExitActions>
                                    <StopStoryboard BeginStoryboardName="flash"/>
                                </Trigger.ExitActions>
                            </Trigger>
                        </Style.Triggers>
                    </Style>
                </Label.Style>
                <Label.Effect>
                    <DropShadowEffect Color="White" ShadowDepth="0" BlurRadius="15"/>
                </Label.Effect>
            </Label>
        </Border>
    </Grid>
</Window>
